package com.itheima.d1_threadcreate2;
/**
 * 掌握线程的第二种创建方式：实现Runnable接口
 */
public class ThreadDemo2 {
    public static void main(String[] args) {
        //1.创建线程任务类对象
        MyRunnable mr = new MyRunnable();
        //2.创建Thread类对象，构造方法中传递Runnable接口实现类对象
        Thread t1 = new Thread(mr);
        //3.启动线程
        t1.start();
    }
}
